package xueqiu

import (
	"gitee.com/lyuanbo/stock-trade/internal/pkg/mq"
	"gitee.com/lyuanbo/stock-trade/internal/pkg/stock/constant"
	"github.com/maypok86/otter"
)

type Option func(*XueQiu)

// WithMq 设置消息队列
func WithMq(mq mq.IMq) Option {
	return func(x *XueQiu) {
		x.mq = mq
	}
}

// WithToken 设置token
func WithToken(token string) Option {
	return func(x *XueQiu) {
		x.token = token
	}
}

// WithStore 设置存储
func WithStore(store otter.Cache[string, []*constant.Kline]) Option {
	return func(x *XueQiu) {
		x.store = store
	}
}
